#include <iostream>
#include <sstream>

#include "arena_base.h"

using namespace std;

Arena_base::Arena_base()
{
  _logfile = new ofstream("logfile.txt");
  *_logfile << "------------------" << endl;
  _time = 0;
  _failure = false;
}

Arena_base::~Arena_base()
{
}

void Arena_base::reset(void)
{
  //cout << "ARENA_BASE: RESET" << endl;
  _time = 0;
  _failure = false;
}

float Arena_base::get_time(void)
{
  return _time;
}

bool Arena_base::failure(void)
{
  return _failure;
}

std::string Arena_base::get_state(void)
{
  stringstream ostr;

  ostr << _time << ": Not defined";
  return string(ostr.str() );
}

void Arena_base::print_state_to_file(void)
{
    *_logfile << get_state() << endl;
}

void Arena_base::update_arena(void)
{
  cout << "Arena_base: NOT IMPLEMENTED" << endl;
}

void Arena_base::info(stringstream &ss)
{
  ss << "Failure: " << _failure << endl;
}

